<?php
namespace Festivalcn\Widget;
use Think\Controller;
class DataWidget extends Controller {

	function getalllistinfo($res){
		$str = null;
		foreach($res as $key=>$v){
			$str .= "<div class=\"content-list clearfix\">"
					. "   <a href=\"".U('zuopindetails',array('atcid'=>$v['id']))."\" style=\"color:#333\">"
					. "       <div class=\"pic-box\">"
					. "           <img src=\"".$v['picture']."\">"
					. "       </div>"
					. "       <div class=\"content-item\">"
					. "           <h5>作品名称</h5>"
					. "           <em>".$v['title']."</em>"
					. "           <p>排名:<i class=\"shortmovie  shortmovie-jiangbei\"></i>".($key+1)."</p>"
					. "       </div>"
					. "   </a>"
					. "   <div class=\"toupiao\">"
					. "       <div class=\"toupiao-btn\" actid=\"".$v['id']."\" num=\"".$v['votes']."\">投票</div>"
					. "       <span><b class=\"num\">".$v['votes']."</b>票</span>"
					. "   </div>"
					. "</div>";
		}
		echo $str;
	}


	function getWinAtc($resdata){
		$str = null;
		foreach ($resdata as $key => $vo) {
			$str .="<a href=\"".$vo['urladdr']."\"class=\"mokuai-item02\" target=\"_blank\">"
				 . "						<div class=\"item-pic\">"
				 . "           					<img src=\"".$vo['picture']."\">"
				 . "						</div>"
				 . "						<span>".$vo['title']."</span>"
				 . "					</a>";
		 }
		 echo $str;
	 }


}
?>

